module.exports = (sequelize, Sequelize)=>{
    const Learning_route = sequelize.define("learning_route", 
    {
        user_mail: {
            type: Sequelize.STRING,
            primaryKey: true,
        },
        tech_id: {
            type: Sequelize.INTEGER,
            primaryKey: true,
        },
        process: {
            type: Sequelize.DOUBLE
        },
        ready: {
            type: Sequelize.BOOLEAN
        },
        // 放在学习目标里，作为初始目标
        origin: {
            type: Sequelize.BOOLEAN,
            defaultValue: false,
        }
    },{
        indexes:[{
            fields: ['user_mail']
        }]
    }, {
        freezeTableName: true,
        timestamps: false,
    });
    // Learning_route.removeAttribute('id');
    Learning_route.removeAttribute('createdAt');
    Learning_route.removeAttribute('updatedAt');
    return Learning_route
}